﻿using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using iOSClub.Toolkit.WindowApp.Models;
using iOSClub.Toolkit.WindowApp.ViewModels.Pages;

namespace iOSClub.Toolkit.WindowApp.Pages;

public partial class iOSManagerPage : UserControl
{
    public iOSManagerPage()
    {
        InitializeComponent();
    }

    private void ItemButtonClick(object? sender, RoutedEventArgs e)
    {
        if(sender is not Control control)return;
        if(control.DataContext is not iOSManageItem item)return;
        if(DataContext is not iOSManagerPageModel model)return;
        model.Interface = item;
    }
}